package com.xhwl.data.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xhwl.common.enums.workbench.MyTaskStatusEnum;
import com.xhwl.common.pojo.workbench.AccountTask;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author: luyi
 * @Description:
 * @Date: Create in 16:01 2021/8/11
 */
@RestController
public interface IAccountTaskService extends IService<AccountTask> {

	/**
	 * k:taskId v:accountIds
	 * @param taskIds
	 * @param status
	 * @return
	 */
	@RequestMapping(value = "/account-task-service/find-by-status", method = RequestMethod.POST)
	Map<Integer, List<Integer>> findByStatus(@RequestPart("taskIds") List<Integer> taskIds, @RequestPart("status") MyTaskStatusEnum status);
	/**
	 * 根据任务id和任务状态查询帐号名称
	 * @param taskIds
	 * @param status
	 * @return
	 */
	@RequestMapping(value = "/account-task-service/find-account-name", method = RequestMethod.POST)
	Map<Integer, String> findAccountNameByTaskId(@RequestPart("taskIds") List<Integer> taskIds, @RequestPart("status") MyTaskStatusEnum status);
}
